import java.util.Arrays;
import java.util.Scanner;

class MyArray<E> {
        public Object[] objects = new Object[3];
        public E getPos(int pos){
            return (E) this.objects[pos];
        }
        public void setVal(int pos, E val){
            this.objects[pos] = val;
        }
    }
public class demo {
    public static void main(String[] args) {
        MyArray<Integer> myArray = new MyArray<>();
        myArray.setVal(0, 1);
        myArray.setVal(1,2);
        int ret  = myArray.getPos(0);
        System.out.println(ret);
    }
}


